package org.java.order.conf;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author WHQ
 * @version 1.0
 * @date 2022-3-21 0021 下午 3:36
 */
@Configuration
public class RedissonConfig {
    @Bean
    public Redisson redisson() {
        // 单机模式
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.32.133:6379").setDatabase(0);
        return (Redisson) Redisson.create(config);
    }
}
